<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<link>
<meta charset="UTF-8">
<title>用户列表</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body class="container">
<div class="width:80%">
    <table class="table table-hover">
        <caption>基本的表格布局</caption>
        <thead>
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>年纪</th>
            <th>编辑</th>
            <th>删除</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="user:${userList}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.age}"></td>
            <td><a th:href="@{/user/find-one(id=${user.id})}">编辑</a></td>
            <td><a th:href="@{/user/delete(id=${user.id})}">删除</a></td>
        </tr>
        </tbody>
    </table>
</div>
<div class="form-group">
    <div class="col-sm-2 control-label">
        <a th:href="@{/user/add}" class="btn btn-info">add</a>
    </div>
</div>
</body>
</html>
